import { defineComponent, h } from 'vue'
import { getTagProps, validateTagProp } from '../utils'
import { constants } from 'smooth-dnd'

export const SmoothDndDraggable01 = defineComponent({
    name: 'SmoothDndDraggable',
    props:{
        tag:{
            validator: validateTagProp,
            default: 'div'
        }
    },
    render(){
        //wrap child
        const tagProps = getTagProps(this, constants.wrapperClass)
        const node = h(tagProps.value, Object.assign({}, tagProps.props), this.$slots?.default?.());
        return node;
    }

})
